import { ProFormSwitch, ProFormText, ProFormTextArea } from "@ant-design/pro-components"

const DictTypeForm: React.FC<{
    data?: System.DictInfo,
}> = ({ data }) => {
    return (<>
        <ProFormText label="字典名称" name="dict_name" rules={[{ min: 3, max: 32, required: true }]} initialValue={data?.dict_name}></ProFormText>
        <ProFormText label="字典类型" name="dict_type" rules={[{ min: 3, max: 32, required: true }]} initialValue={data?.dict_type}></ProFormText>
        <ProFormSwitch label="状态" name="status" initialValue={data ? data.status : true}></ProFormSwitch>
        <ProFormTextArea label="备注" name="remark" rules={[{ max: 255 }]} initialValue={data?.remark}></ProFormTextArea>
    </>)
}

export default DictTypeForm
